﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LGCourt.Logic.BLL;
using KMFrame.Permission.Util;

namespace lgweb.lawyer
{
    public partial class signdocuments : System.Web.UI.Page
    {
        private string _AH = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!SessionBox.CheckUserSession())
            {
                Response.Redirect("/user/login.aspx");
            }
            if (!this.IsPostBack)
            {
                GetParam();
                GetCaseALLInfo();
            }
        }

        private void GetParam()
        {
            this._AH = string.IsNullOrEmpty(Request.QueryString["ah"]) ? "" : Request.QueryString["ah"];
            if (string.IsNullOrEmpty(this._AH))
            {
                Response.Redirect("/lawyer/index.aspx");
            }
            this.hdnAH.Value = this._AH;
            this.spAH.InnerHtml = this._AH;
        }

        /// <summary>
        /// 获取签收文书
        /// </summary>
        private void GetCaseALLInfo()
        {
            Lawyer bll = new Lawyer();

            int _userID = SessionBox.GetUserSession().UserID;
            UserCondition param = new UserCondition();
            param.AH = this._AH;
            param.UserID = _userID;

            CaseALLInfo result = (CaseALLInfo)bll.GetCaseALLInfo(param);

            if (result != null)
            {
                //当事人
                this.rptWSQSList.DataSource = result.WSQSList;
                this.rptWSQSList.DataBind();

            }
        }

    }
}